<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ComboboxClass
 *
 * @author Administrador
 */
class ComboboxClass {

    //put your code here
    private $tbNome;
    private $cols;
  
    public static function showContent($tbName,$cod,$name) {
        include_once '../../db/DataBaseClass.php';
        $content = "";
        $db = new DataBaseClass("localhost:3306", "root", "9651myla", "spc");
        
        $result=$db->executeSQL("SELECT * FROM ".$tbName."");
            $content = $content . "<option value=\"\"></option>";
        while ($row = mysql_fetch_array($result)) {
            $content = $content . "<option value=\"" . $row[$cod] . "\"> " . $row[$name] . "</option>";
        }
        
        echo $content;
    }
    
}
